package com.tongcao.cn.configcenter.nacos;

import com.alibaba.nacos.api.config.annotation.NacosConfigurationProperties;
import com.alibaba.nacos.api.config.annotation.NacosValue;
import com.tongcao.cn.constants.NacosConstant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author:tongcao
 * @since:2019/7/26 14:47
 * Description:
 */


@Component
@NacosConfigurationProperties(dataId = NacosConstant.Conf.EXAMPLE_ID)
public class NacosExampleBean {
    private static final Logger logger = LoggerFactory.getLogger(NacosExampleBean.class);


    @NacosValue(value = "${userName:tongcao}", autoRefreshed = true)
    private String userName;

    private String userUrl;


    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserUrl() {
        return userUrl;
    }

    public void setUserUrl(String userUrl) {
        this.userUrl = userUrl;
    }
}